﻿namespace HuwmanCode.Diagnostics.Logging

open System
open System.Runtime.Serialization
open System.ServiceModel

/// <summary>
/// The interface for a log asynchronous writer
/// </summary>
type ILogAsyncWriter =
    inherit ILogWriter

    /// <summary>
    /// Begins an asynchronous write operation.
    /// </summary>
    /// <param name="message">The trace message.</param>
    abstract BeginWrite: message:TraceMessage * callback:AsyncCallback * state:Object -> IAsyncResult

    /// <summary>
    /// Waits for an asynchronous write operation to complete.
    /// </summary>
    abstract EndWrite: x:IAsyncResult -> unit